#ifndef SYSCON_H
#define SYSCON_H

#include <stdbool.h>
#include <stdint.h>
#include "aurora.h"

// #define SYSCON_PFLASH_BOOT (0x1<<0)
// #define SYSCON_SPI_BOOT    (0x1<<1)
// #define SYSCON_SD_BOOT     (0x1<<2)
// #define SYSCON_UART_UPDATE (0x1<<16)

enum {
    SYSCON_PFLASH_BOOT = 0x1,
    SYSCON_SDMMC0_BOOT = 0x2,
    SYSCON_SDMMC1_BOOT = 0x3,
    SYSCON_SPINOR_BOOT = 0x4,
    SYSCON_UART_UPDATE = 0x1 << 16
};

uint32_t syscon_get_boot_source(void);
bool syscon_get_update(void);
void syscon_set_user_update(uint32_t flag);
uint32_t syscon_get_user_update(void);

#endif /* SYSCON_H */
